<?php
include('config.php');
$uname=$_POST['name'];
$sql="SELECT * FROM userdata,userlocation WHERE userdata.uid=userlocation.uid AND name LIKE '%$uname%'";		
$sqlquery=mysql_query($sql);
while($row = mysql_fetch_assoc($sqlquery)) {
	$data[]=$row;
}
	echo json_encode($data);
mysql_close();
?>